package com.ms.content.service.impl;

import com.ms.common.utils.PageUtils;
import com.ms.common.utils.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ms.content.dao.BargainingItemDao;
import com.ms.content.entity.BargainingItemEntity;
import com.ms.content.service.BargainingItemService;


@Service("bargainingItemService")
public class BargainingItemServiceImpl extends ServiceImpl<BargainingItemDao, BargainingItemEntity> implements BargainingItemService {

    @Autowired
    private BargainingItemDao bargainingItemDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<BargainingItemEntity> page = this.page(
                new Query<BargainingItemEntity>().getPage(params),
                new QueryWrapper<BargainingItemEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public BargainingItemEntity se(Long uid) {
        //查询最近一次该用户帮砍修改的记录
        BargainingItemEntity bargainingItemEntity1 =  bargainingItemDao.selectOneZjTime(uid);
        return bargainingItemEntity1;
    }

    @Override
    public Long selectById(Long uid, Integer goodsId, Long bkhdId) {
        Long id =  bargainingItemDao.selectByIdD(uid,goodsId,bkhdId);
        return id;
    }


}